using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Musicman.Business;
using MusicmanWeb.Custom;

namespace MusicmanWeb.USER
{
    public partial class PendingDownloads : MusicmanPage
    {
        protected override void Page_Load(object sender, EventArgs e)
        {
            ReddirectNonActiveSession();
        }

        protected void RemoveButton_Command(object sender, CommandEventArgs e)
        {
            MyGridView gv = this.PendingDownloadsGV;
            long userid = Int64.Parse(Session["UserID"].ToString());
            foreach (int index in gv.GetSelectedIndices())
            {
                long key = (long)gv.DataKeys[index].Value;
                DataManager.Instance.RemovePendingDownload(userid, key, 0);
            }
            gv.DataBind();
        }
    }
}
